package letter_grade;

public class NumericToLetter {
	
	private double numeric;
	
	public NumericToLetter (double n){
		numeric = n;
	}
	
	public String getLetterGrade(){
		if(numeric >= 3.85){
			return "A";
		}
		else if (numeric >= 3.5){
			return "A-";
		}
		else if (numeric >= 3.15){
			return "B+";
		}
		else if (numeric >= 2.85){
			return "B";
		}
		else if (numeric >= 2.5){
			return "B-";
		}
		else if (numeric >= 2.15){
			return "C+";
		}
		else if (numeric >= 1.85){
			return "C";
		}
		else if (numeric >= 1.5){
			return "C-";
		}
		else if (numeric >= 1.15){
			return "D+";
		}
		else if (numeric >= 0.85){
			return "D";
		}
		else if (numeric >= 0.5){
			return "D-";
		}
		else if (numeric >= 0){
			return "F";
		}
		else return "Invalid input";
	}
}
		

